<?php



class OrganizationModel extends Model
{
    protected $trueTableName = 'fj_org';
    protected $tableName = 'org';
    protected $fields = array(
        'id', 'creator_user_id', 'prov_id', 'city_id', 'uni_id', 'org_name', 'org_desc', 'create_time', 'update_time', 'org_type', '_pk' => 'id', '_autoinc' => true
    );

    protected $_map = array(
        'userId' => 'creator_user_id', // 把表单中userId映射到数据表的creator_user_id字段
        'province' => 'prov_id',
        'city' => 'city_id',
        'university' => 'uni_id',
        'orgName' => 'org_name',
        'orgDesc' => 'org_desc',
        'orgType' => 'org_type',
        'orgId' => 'id',
        'picUrl'=> 'pic_url'//图片URL地址，数据库暂缺
    );

    protected function checkOrgName($orgName)
    {
        return true;//校验逻辑待开发
    }

    protected function checkOrgDesc($orgDesc)
    {
        return true;
    }

    protected function checkOrgType($orgType)
    {
        return true;
    }

}


?>